package com.iot.core.data;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
@Data
@Schema(name = "TreeViewNode",description = "")
public class TreeViewNode extends BaseDto {


    @Schema(name = "父编号",description = "")
    private  Long  pid=0L ;

    @Schema(name = "菜单代码",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  code ="";

    @Schema(name = "菜单名称",description = "")
    @NotBlank(message = "菜单名称不能为空")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  name ="";

    @Schema(name = "类型",description = "目录、菜单、权限")
    @Size(min =0,max = 10,message = "长度范围0-10")
    private  String  lx ="";

    @Schema(name = "图标",description = "")
    private  String  imgurl ="";

    @Schema(name = "参数1",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  p1 ="";

    @Schema(name = "参数2",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  p2 ="";

    @Schema(name = "参数3",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  p3 ="";

    @Schema(name = "参数4",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  p4 ="";

    @Schema(name = "Expanded",description = "")
    private  boolean expanded ;

    @Schema(name = "HasChildren",description = "")
    private  boolean hasChildren ;

    @Schema(name = "children",description = "")
    private  List<TreeViewNode>  children=new ArrayList<>();

    @Schema(name = "Obj",description = "")
    private  String  obj ;

}
